﻿@{
    ViewBag.Title = "Particulars";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using DepartmentWork.Model
@model DepartmentWork.Model.ProjectManintenanceAppopsViewModel
<link href="~/Assets/plugins/bootstrap-select/bootstrap-select.min.css" rel="stylesheet" />
<script src="~/Assets/plugins/bootstrap-select/bootstrap-select.min.js"></script>

<link href="~/Assets/plugins/bootstrap-datepicker/css/datepicker3.css" rel="stylesheet" />
<link href="~/Assets/plugins/bootstrap-datepicker/css/datepicker-theme.css" rel="stylesheet" />
<script src="~/Assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
<script src="~/Assets/plugins/chosen/chosen.jquery.min.js"></script>
<script src="~/Assets/js/pages/form-elements.js"></script>
<style>
    .btn-default {
        color: #333;
        background-color: #FFF;
        border-color: #CCC;
        height: 34px;
    }
</style>

<div class="page-header">
    <div class="pull-left">
        <ol class="breadcrumb visible-sm visible-md visible-lg">
            <li><a href="@Url.Action("Index", "Home", new { area = "" })"><i class="icon fa fa-home"></i>主页</a></li>
            <li><a href="~/PerationAndMaintenanceArea/Maintenance/Maintenance"><i class="fa fa-envelope"></i>运维项目管理</a></li>
            <li class="active"><a href="#"><i class="fa fa-envelope"></i>运维工作详情</a></li>
        </ol>
    </div>
</div>


@{
    if (ViewBag.Flag == "True")
    {
    <div class="alert alert-success">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>&emsp;@ViewBag.FlagInfo！</strong>
    </div>
    }
    if (ViewBag.Flag == "False")
    {
    <div class="alert alert-danger">
        <button type="button" class="close" data-dismiss="alert">×</button>
        <strong>&emsp;操作失败！</strong> @ViewBag.FlagInfo
    </div>
    }
}

<div class="row" style="margin: 0 auto">
    <div class="col-lg-3 col-md-6 col-sm-20 col-xs-12" style="float: left; width: 50%; height: 100%">
        <div class="panel bk-widget bk-border-off">
            <div class="bk-border-success bk-bg-white bk-fg-success bk-ltr bk-padding-15">
                <div class="row" style="text-align: center">
                    <div class="col-xs-8 text-center bk-vcenter">
                        <a href="@Url.Action("Reacord", "Maintenance", new { area = "PerationAndMaintenanceArea", projectId = this.Model.appops_id })">
                            <h3 style="color: black;" class="bk-margin-off">运维记录</h3>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <div class="col-lg-3 col-md-6 col-sm-6 col-xs-12" style="float: left; width: 50%; height: 100%">
        <div class="panel bk-widget bk-border-off bk-noradius">
            <div class="bk-border-info bk-bg-white bk-fg-info bk-ltr bk-padding-15">
                <div class="row" style="text-align: center">
                    <div class="col-xs-8 text-center bk-vcenter">
                        <a href="@Url.Action("Document", "Maintenance", new { area = "PerationAndMaintenanceArea", projectId = this.Model.appops_id })">
                            <h3 style="color: black;" class="bk-margin-off">项目文档</h3>
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>






<div class="col-md-8 col-xs-12" style="width: 70%">
    <div class="panel bk-widget bk-border-off bk-noradius">
        <div class="panel">
            <div class="panel-heading bk-bg-primary">
                <h6><i class="fa fa-table red"></i><span class="break"></span>项目简况</h6>
            </div>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered">
                        <tbody>
                            <tr>
                                <td style="width: 15%"><b>项目名称:</b></td>
                                <td style="width: 35%" data-project-field="name">@this.Model.appops_name</td>
                                <td style="width: 15%"><b>项目编号:</b></td>
                                <td style="width: 35%" data-project-field="no">@this.Model.appops_no</td>
                            </tr>
                            <tr>
                                <td><b>创建人:</b></td>
                                <td data-project-field="department">@this.Model.appops_founder</td>
                                <td><b>创建时间:</b></td>
                                <td data-project-field="bussiness">@this.Model.appops_time</td>
                            </tr>
                            <tr>
                                <td><b>项目负责人:</b></td>
                                <td>@this.Model.appops_principal</td>
                                <td><b>业务主管部门:</b></td>
                                <td data-project-field="deadline">@this.Model.appops_department</td>
                            </tr>
                            <tr>
                                <td><b>关级/署级:</b></td>
                                <td data-project-field="owner">@this.Model.appops_workrank</td>
                                <td><b>项目级别:</b></td>
                                <td data-project-field="user">@this.Model.appops_rank</td>
                            </tr>
                            <tr>
                                <td><b>业务类型:</b></td>
                                <td data-project-field="contact">@this.Model.appops_businesstype</td>
                                <td><b>项目状态:</b></td>
                                <td data-project-field="tel">@this.Model.appops_state</td>

                            </tr>
                            <tr>
                                <td><b>系统关联方式:</b></td>
                                <td data-project-field="contact">@this.Model.appops_relevanceway</td>
                                <td><b>关联系统名称:</b></td>
                                <td data-project-field="tel">@this.Model.appops_relevancename</td>
                            </tr>
                            <tr>
                                <td><b>用户人数:</b></td>
                                <td data-project-field="contact">@this.Model.appops_quantity</td>
                                <td><b>使用频率:</b></td>
                                <td data-project-field="tel">@this.Model.appops_frequency</td>
                            </tr>
                            <tr>
                                <td><b>业务联系人和电话:</b></td>
                                <td  colspan="3" data-project-field="department">@this.Model.appops_businesslinkman</td>

                            </tr>
                            <tr>
                                <td><b>功能描述:</b></td>
                                <td colspan="3" data-project-field="description">@this.Model.appops_describe</td>
                            </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="col-lg-4 col-md-12" style="width: 30%; float: right">
    <div class="panel panel-default">
        <div class="panel-heading bk-bg-white">
            <h4><b>项目操作</b></h4>
            <div class="panel-actions">
                <a href="#" class="btn-minimize"><i class="fa fa-caret-up"></i></a>
                <a href="#" class="btn-close"><i class="fa fa-times"></i></a>

            </div>
        </div>
        <div class="panel-body bk-noradius">
            <div class="bk-bg-white bk-padding-off-top bk-padding-off-bottom">
                <div class="row">

                    <div class="col-xs-9 bk-vcenter">
                        <span>当前项目状态：<b style="color: firebrick">@this.Model.appops_state</b></span>
                    </div>
                </div>
            </div>
            <hr class="bk-margin-off">
        @if (ViewBag.IsAdmin == true)
        { 
            <div class="bk-bg-white bk-padding-off-top bk-padding-off-bottom">
                <div class="row">
                    <div class="col-xs-9 bk-vcenter">
                        <a data-toggle="modal" data-target="#changeProjectStateModal">
                            <h4 class="bk-fg-primary bk-fg-darken bk-margin-off-bottom" style="cursor: pointer">项目状态操作</h4>
                        </a>
                    </div>
                </div>
            </div>
            <hr class="bk-margin-off">
            <div class="bk-bg-white bk-padding-off-top bk-padding-off-bottom">
                <div class="row">
                    <div class="col-xs-9 bk-vcenter">
                        <a data-toggle="modal" data-target="#editProjectModal">
                            <h4 class="bk-fg-primary bk-fg-darken bk-margin-off-bottom" style="cursor: pointer">项目编辑</h4>
                        </a>
                    </div>
                </div>
            </div>
        }
            @if (ViewBag.FZ == true || ViewBag.IsAdmin == true)
            {
                <hr class="bk-margin-off">
            <div class="bk-bg-white bk-padding-off-top bk-padding-off-bottom">
                <div class="row">
                    <div class="col-xs-9 bk-vcenter">
                        <a data-toggle="modal" data-target="#AAA">
                            <h4 class="bk-fg-primary bk-fg-darken bk-margin-off-bottom" style="cursor: pointer">项目账号</h4>
                        </a>
                    </div>
                </div>
            </div>
            <hr class="bk-margin-off"> 
            }
        </div>
    </div>
</div>








<!-- 项目详情编辑 -->

<div class="modal fade" id="editProjectModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <script>

        window.onload = function () {
            $("#datetimepicker").datepicker();
        };
    </script>

    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">编辑项目
                </h4>
            </div>
            <form action="@Url.Action("UpdateParticulars", "Maintenance", new { area = "PerationAndMaintenanceArea" })" method="POST">
                <div id="div_CreateProject" class="modal-body">
                    <div class="row">

                        <label class="col-md-3 control-label" for="text-input">运维项目名称：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_name" id="text-input" style="border-color: cornflowerblue" name="tb_appops_name" class="form-control" placeholder="Text" type="text">
                            <input type="hidden" name="hid_appops_id" value="@this.Model.appops_id"/>
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />



                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">项目编号：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_no" readonly="true" id="text_appops_no" style="border-color: cornflowerblue" name="tb_appops_no" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />
                    <div class="row">
                        <label class="col-md-3 control-label">关级/署级：</label>
                        <div class="col-md-9" style="max-height: 34px">
                            <select name="select_appops_workrank" class="form-control selectpicker">
                                @if (this.Model.appops_workrank == "关级")
                                {
                                    <option selected="selected" value="关级">关级</option>
                                    <option value="署级">署级</option>
                                }
                                else
                                {
                                    
                                    <option value="关级">关级</option>
                                    <option value="署级">署级</option>
                                }

                            </select>
                        </div>
                    </div>

                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label">项目级别：</label>
                        <div class="col-md-9" style="max-height: 34px">
                            <select name="select_appops_rank" class="form-control selectpicker">
                                <option value="一级">一级</option>
                                <option value="二级">二级</option>
                                <option value="三级">三级</option>
                            </select>
                        </div>
                    </div>

                    <br />


                    <div class="row">
                        <label class="col-md-3 control-label">项目负责人：</label>
                        <div class="col-md-9" style="max-height: 34px">
                            <select name="select_WorkLeader" id="select_appops_principal" class="form-control selectpicker" multiple="multiple">
                                @{
                                    List<UserInfoViewModel> userList = (List<UserInfoViewModel>)TempData["UserList"];
                                    if (userList != null)
                                    {
                                        for (int i = 0; i < userList.Count(); i++)
                                        {
                                            var item = userList[i];

                                            if (item.IsProjectLeader == "True")
                                            {
                                    <option selected="selected" value="@item.UserId">@item.UserName</option>
                                            }
                                            else
                                            {
                                    <option value="@item.UserId">@item.UserName</option>
                                            }
                                        }
                                    }
                                }
                            </select>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">业务主管部门：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_department" id="text-input" style="border-color: cornflowerblue" name="tb_appops_department" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">业务联系人和电话：</label>
                        <div class="col-md-9" style="max-height: 34px">
                            <input value="@this.Model.appops_businesslinkman" id="text-input" style="border-color: cornflowerblue" name="tb_appops_businesslinkman" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />


                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">业务类型：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_businesstype" id="text-input" style="border-color: cornflowerblue" name="tb_appops_businesstype" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />


                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">用户人数：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_quantity" id="text-input" style="border-color: cornflowerblue" name="tb_appops_quantity" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />


                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">使用频率：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_frequency" id="text-input" style="border-color: cornflowerblue" name="tb_appops_frequency" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">关联系统名称：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_relevancename" id="text-input" style="border-color: cornflowerblue" name="tb_appops_relevancename" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />

                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">系统关联方式：</label>
                        <div class="col-md-9">
                            <input value="@this.Model.appops_relevanceway" id="text-input" style="border-color: cornflowerblue" name="tb_appops_relevanceway" class="form-control" placeholder="Text" type="text">
                            <span class="workName_class"></span>
                        </div>
                    </div>
                    <br />



                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">功能描述：</label>
                        <div class="col-md-9">
                            <textarea id="textarea-input" name="tb_appops_describe" rows="5" class="form-control" placeholder="Content..">@this.Model.appops_describe</textarea>
                            <span class="Describe_class"></span>
                        </div>
                    </div>
                    <br />

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <input type="submit" value="提交更改" class="btn btn-primary" />
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>



<!-- 项目账号 -->
<div class="modal fade" id="AAA" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <script>

        window.onload = function () {
            $("#datetimepicker").datepicker();
        };
    </script>

    <div style="height: 400px" class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">项目账号记录</h4>
            </div>
            <form action="@Url.Action("NumberCompile", "Maintenance", new { area = "PerationAndMaintenanceArea" })" method="POST">
                <div id="div_CreateProject" class="modal-body">

                    <br />
                    <div class="row">
                        <label class="col-md-3 control-label" for="text-input">编辑账号：</label>
                        <input type="hidden" name="hid_appops_id" value="@this.Model.appops_id"/>
                        <div class="col-md-9">
                            <textarea style="height: 300px" id="textarea-input" name="tb_appops_aaa" rows="5" class="form-control" placeholder="Content..">@this.Model.appops_aaa</textarea>
                        </div>
                    </div>
                    <br />

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <input type="submit" value="提交更改" class="btn btn-primary" />
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>


<!-- 项目状态 -->

<div class="modal fade" id="changeProjectStateModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">


    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel2">项目状态操作
                </h4>
            </div>
            <form action="@Url.Action("StateCompile", "Maintenance")" method="POST">
                <div class="modal-body">
                    <input type="hidden" name="hid_appops_id" value="@this.Model.appops_id"/>
                    <div class="row">
                        <br />
                        <label class="col-md-3 control-label">项目状态操作：</label>
                        <div class="col-md-9">

                            <select name="select_AppspsStatus" class="form-control select2">
                                <option value="0">进行中</option>
                                <option value="1">完成</option>
                            </select>
                        </div>
                    </div>

                    <br />

                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default" data-dismiss="modal">
                        关闭
                    </button>
                    <input type="submit" class="btn btn-primary" value="提交更改" />
                </div>
            </form>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal -->
</div>

